import { ref} from 'vue'
import { defineStore } from 'pinia'
import { getCategory} from '@/apis/Layout';
export const useCategoryStore = defineStore('category', () => {
  //数据
  const categoryList = ref([])
 //方法
  const getCategoryAPI = async () =>{
  const res=await getCategory()
  categoryList.value=res.result
}

return { categoryList, getCategoryAPI }
})